package cn.wolfcode.shop.cloud.service.impl;

import cn.wolfcode.shop.cloud.domain.Good;
import cn.wolfcode.shop.cloud.mapper.GoodsMapper;
import cn.wolfcode.shop.cloud.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

@Service
public class GoodsServiceImpl implements IGoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public List<Good> queryByIds(ArrayList<Long> ids) {
        if (ids == null || ids.size() == 0) {
            return Collections.EMPTY_LIST;
        }
        return goodsMapper.queryByIds(ids);
    }
}
